/**
 * Created by Dalyn on 2017/3/13.
 */
import React from "react";
import { hashHistory } from 'react-router';
import "./Limit.css";
import { Modal } from 'antd';
import { Alert } from 'antd';

export default class handleOK extends React.Component{
    constructor(props){
        super(props);
        this.state={
            handleOK:false,
            text:"确定新建此角色吗？"
        }
        this.style={
            alert:{
                width:"300px",
                height:"160px",
                margin:"0 auto"
            }
        }
    }
    handleOk = (e) => {
        this.props.commitsurt();
        this.setState({
            handleOK: false,
        });
    };
    handleCancel = (e) => {
        this.setState({
            handleOK: false,
        });
    }
    render(){
        return (
            <Modal visible={this.state.handleOK}  onOk={this.handleOk} onCancel={this.handleCancel} style={{width:"440px",height:"270px",display:"block"}}>
                <Alert message={this.state.text} banner  style={this.style.alert}/>
            </Modal>
        )
    }
}
